home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MACD 5
/
MACD 5.bin
/
workbench
/
tools
/
czesc_3
/
multiinstall
/
multiinstall.doc
< prev
next >
Wrap
Text File
|
1991-09-18
|
7KB
|
183 lines
-----------------------------------------------------------------------
MULTINSTALL VERSION 1.00
DATE: AUGUST 13th 1991
AUTHOR: Stefan G. Boldorf
-----------------------------------------------------------------------
LEGAL STUFF
This program is in the PUBLIC DOMAIN. Anyone may copy and use both
source code and executable privately. Commercial use is permitted
only with my expressed written consent.
This package (meaning the source, executable and manual) is provided
'AS IS' without any warranties as to its functions or safety. The user
will be responsible for all damages resulting directly or indirectly
from the use, misuse, failure to use or program faillure. I cannot
be made liable for any damage at all!
Mackenbach, 20th of August 1991,
Stefan G. Boldorf
-----------------------------------------------------------------------
CONTENTS:
1. WHAT IS MULTIINSTALL
2. HOW TO USE MULTIINSTALL
3. THE SYNTAX
4. A DEMO SCRIPT
5. A WORD TO THE USER
-----------------------------------------------------------------------
1. WHAT IS MULTIINSTALL
MultiInstall is a simple script driven program for the installation of
larger program packages.
MultiInstall executes CLI-like script files in a simple language, de-
scribed below.
-----------------------------------------------------------------------
2. HOW TO USE MULTIINSTALL
MultiInstall can be started via both CLI and Workbench. From CLI a line
would look like this:
'MultiInstall InstallMe.mil'
The '.mil' suffix stands for 'M ulti I nstal L', of course.
The '.mil' file has to be an ASCII file.
From Workbench MultiInstall is started by double-clicking the icon of
the script file or by clicking the script icon, holding down a SHIFT
key and double-clicking the MultiInstall icon. Clicking on the Multi-
Install icon alone causes a short message to appear, only.
I have not tested MultiInstall a lot, so be careful. Running more than
one MultiInstall at the same time may cause problems with the DODOS
command.
-----------------------------------------------------------------------
3. THE SYNTAX
MultiInstall knows 16 different commands:
Most commands need one or two parameters. A parameter is a string en-
closed in '"'s. to specify a '"' inside a parameter use '\"'. The '\'
character can be used like a normal escape character. A parameter can
hold up to 79 character, larger ones will cause an error.
Command | Function | Syntax example |
--------+--------------------------------------+----------------------+
MAKEDIR | Create an Amiga-DOS directory | MAKEDIR "DF0:DRAWER" |
DELETE | Delete an Amiga-DOS file | DELETE "RAM:Data" |
DODOS | Execute an CLI-like command line | DODOS "format df0:" |
RENAME | Rename an Amiga-DOS file or drawer | RENAME "A" AS "B" |
STORE | Store an Amiga-DOS file in memory | STORE "df0:A" AS "1" |
WRITE | Write a previously stored file | WRITE "1" AS "df1:A" |
COPY | Copy an Amiga-DOS file | COPY "1" AS "2" |
FLUSH | Free the memory of a stored file | FLUSH "1" |
PURGE | Free the memory of all stored files | PURGE |
CLEAR | Clear the window contents | CLEAR |
PRINT | Print a text line on the window | PRINT "Hello World" |
ASK | Get a YES/NO response from the user | ASK "Really delete?" |
WAIT | Wait for the user to click a gadget | WAIT "Hit it!" |
IF | Start a if-else-end construct | see below |
QUIT | Stop script execution | QUIT |
EXISTS | See if an Amiga-DOS file exists | EXITST "df0:c/dir" |
3.1. THE IF COMMAND
The IF command starts a command-structure of the following form:
IF <Predicate>
Commands ... (IF-body)
ELSE
Commands ... (ELSE-body)
END
The <Predicate> item can be substituted by this six words:
i. TRUE (IF-body will always be executed)
ii. FALSE (IF-body will never be executed)
iii. YES (IF-body will be executed, if the user has clicked the last
ASK command with 'YES')
iv. NO (IF-body will be executed, if the user has clicked the last
ASK command with 'NO')
v. FAULT (IF-body will be executed, if the last EXISTS command
was not succesful)
vi. OK (IF-body will be executed, if the last EXISTS command
was succesful)
An ELSE-body-END construct does not have to appear, the END command
has. IF commands can be nested.
3.2 REMARKS
Remarks can be added after a ';' to the end of the current line.
-----------------------------------------------------------------------
4. A DEMO SCRIPT
This is a demo script, which has no usage, but to show you how Multi-
Install works.
CLEAR;
PRINT "This is MULTIINSTALL"
PRINT "--------------------"
PRINT " "; MultiInstall accepts no "" empty strings
MAKEDIR "RAM:C_TMP"
DODOS "copy >NIL: SYS:C to RAM:C_TMP";
DODOS "assign C: RAM:C_TMP";
STORE "df0:Disk.info" AS "DISK_ICON";
WAIT "Insert an empty, formatted disk in drive DF0:";
WRITE "DISK_ICON" AS "DF0:Disk.info";
EXISTS "DF0:c"
IF FAULT
MAKEDIR "DF0:C";
END
DODOS "copy >NIL: RAM:C_TMP to DF0:C";
ASK "DELETE TRASHCAN ?"
IF YES
DELETE "DF0:TRASHCAN";
DELETE "DF0:TRASHCAN.INFO";
ELSE
PRINT "The trashcan remains";
END
QUIT;
-----------------------------------------------------------------------
5. A WORD TO THE USER
This utility was hacked up in a couple of days, because I couldn't get
XIcon to run my installation script without a dozen disk changes.
I had the idea weeks ago, but the additional work scared me of a bit.
At last I sat down and wrote it. MultiInstall is not the best script
execution utility around, and there may be some errors in it, but it
could be the basis of a better, larger one. I thought other people
would find it useful or interesting, so I made it PUBLIC DOMAIN.
To recreate the file you need AZTEC-C 3.6a or above.
Have fun, enjoy, CU,
Stefan G. Boldorf
Flürchenstraße 16
W-6751 Mackenbach
GERMANY
-----------------------------------------------------------------------